/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aybolit.core.objects;

import aybolit.core.objects.bo.OperatorsBo;
import aybolit.core.objects.model.Operators;
import java.io.Serializable;
import java.util.List;

/**
 *
 * @author Masumov Emin
 */
public class OperatorsBean implements Serializable {

    //DI via Spring
    OperatorsBo operatorsBo;
    public String name;
    public String address;
    //getter and setter methods

    public OperatorsBo getOperatorsBo() {
        return operatorsBo;
    }

    public void setOperatorsBo(OperatorsBo operatorsBo) {
        this.operatorsBo = operatorsBo;
    }


    //get all customer data from database
    public List<Operators> getCustomerList() {
        List<Operators> l=operatorsBo.findAlloperators();
        return l; 
    }

    //add a new customer data into database
    public String addCustomer() {

        Operators cust = new Operators();
//		cust.setName(getName());
//		cust.setAddress(getAddress());

//		customerBo.addCustomer(cust);

        clearForm();

        return "";
    }

    //clear form values
    private void clearForm() {
//		setName("");
//		setAddress("");
    }
}
